package cn.school.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 会议参会人员权限表
 * @TableName meeting_permission
 */
@TableName(value ="meeting_permission")
@Data
public class MeetingPermission implements Serializable {
    /**
     * 会议参会人员权限id
     */
    @TableId
    private Long meetingPermissionId;

    /**
     * 权限名称
     */
    private String meetingPermissionName;

    /**
     * 权限解释
     */
    private String meetingPermissionInfo;

    /**
     * 会议id
     */
    private Long meetingId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MeetingPermission other = (MeetingPermission) that;
        return (this.getMeetingPermissionId() == null ? other.getMeetingPermissionId() == null : this.getMeetingPermissionId().equals(other.getMeetingPermissionId()))
            && (this.getMeetingPermissionName() == null ? other.getMeetingPermissionName() == null : this.getMeetingPermissionName().equals(other.getMeetingPermissionName()))
            && (this.getMeetingPermissionInfo() == null ? other.getMeetingPermissionInfo() == null : this.getMeetingPermissionInfo().equals(other.getMeetingPermissionInfo()))
            && (this.getMeetingId() == null ? other.getMeetingId() == null : this.getMeetingId().equals(other.getMeetingId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMeetingPermissionId() == null) ? 0 : getMeetingPermissionId().hashCode());
        result = prime * result + ((getMeetingPermissionName() == null) ? 0 : getMeetingPermissionName().hashCode());
        result = prime * result + ((getMeetingPermissionInfo() == null) ? 0 : getMeetingPermissionInfo().hashCode());
        result = prime * result + ((getMeetingId() == null) ? 0 : getMeetingId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", meetingPermissionId=").append(meetingPermissionId);
        sb.append(", meetingPermissionName=").append(meetingPermissionName);
        sb.append(", meetingPermissionInfo=").append(meetingPermissionInfo);
        sb.append(", meetingId=").append(meetingId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}